class Person {
    private name: string;
    private age: number

    constructor(name: string, age: number) {
        this.name = name
        this.age = age
    }
}

const person: Person = new Person('陶品奇', 22)

interface ICTORPerson {
    // 函数构造签名
    new(): Person
}

function factory(callback: ICTORPerson): Person {
    return new callback()
}


const result:Person = factory(<ICTORPerson>Person)
console.log(result)
